package jicheng1;

public class Doctor {
    private String name;
    private String number;

    public Doctor(String name, String number) {
        this.name = name;
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }
    public void cure(Pet a){
        System.out.println("<<<<<<<<<<<<<<<<<<<");
        System.out.println("兽医"+name+"正在给"+a.getName()+"看病");
        a.print();
        if (a instanceof Hamster){
            ((Hamster) a).bite();
        }
        System.out.println("望闻问切");
        if (a.getHelth()<60){
            System.out.println("打针，吃药，挂水");
            a.setHelth(60);
            System.out.println("健康值恢复到"+a.getHelth());
            System.out.println("本次治疗费用两千五");
        }else {
            System.out.println(name+"说"+a.getName()+"很健康，没有病");
        }
    }
}
